﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Register.aspx.cs" Inherits="RegisterUsers.Register" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <table>
    
    <tr><td> Username:</td><td>
        <asp:TextBox ID="UserNameBox" runat="server" TextMode="SingleLine"></asp:TextBox>
        <asp:RegularExpressionValidator runat="server" id="UserNameValidator" ValidationExpression=".{3,18}" ControlToValidate="UserNameBox" Text="Invalid username"></asp:RegularExpressionValidator>
        <asp:RequiredFieldValidator ID="UsernameEmpty" runat="server" ControlToValidate="UserNameBox" Text="Field Required"></asp:RequiredFieldValidator>
    </td></tr>
    
    <tr><td>  Password:</td><td>
        <asp:TextBox ID="PasswordBox" TextMode="Password" runat="server"></asp:TextBox>
        <asp:RegularExpressionValidator runat="server" id="PasswordBoxValidator" ValidationExpression=".{3,18}" ControlToValidate="PasswordBox" Text="Invalid username"></asp:RegularExpressionValidator>
        <asp:RequiredFieldValidator runat="server" ID="PasswordEmpty" ControlToValidate="PasswordBox" Text="Field Required"></asp:RequiredFieldValidator>
    </td></tr>

    <tr><td>  Repeat password:</td><td>
        <asp:TextBox ID="RepeatPasswordBox" TextMode="Password" runat="server"></asp:TextBox>
        <asp:CompareValidator ID="PasswordMatchValidator" ControlToValidate="RepeatPasswordBox" ControlToCompare="PasswordBox" Text="Passwords do not match" runat="server"></asp:CompareValidator>
    </td></tr>

    <tr><td>  First name:</td><td>
        <asp:TextBox ID="FirstNameBox" runat="server" TextMode="SingleLine"></asp:TextBox>
        <asp:RequiredFieldValidator ID="FirstnameRequiredValidator" runat="server" ControlToValidate="FirstNameBox" Text="Field Required"></asp:RequiredFieldValidator>
    </td></tr>

    <tr><td>  Last name:</td><td>
        <asp:TextBox ID="LastNameBox" runat="server" TextMode="SingleLine"></asp:TextBox>
        <asp:RequiredFieldValidator ID="LastnameRequiredValidator" runat="server" ControlToValidate="LastNameBox" Text="Field Required"></asp:RequiredFieldValidator>
    </td></tr>

    <tr><td>  Age:</td><td>
        <asp:TextBox ID="AgeBox" runat="server" TextMode="SingleLine"></asp:TextBox>
        <asp:RequiredFieldValidator ID="AgeRequiredValidator" runat="server" ControlToValidate="AgeBox" Text="Field Required"></asp:RequiredFieldValidator>
        <asp:RangeValidator ID="AgeRangeValidator" runat="server" MinimumValue="18" MaximumValue="81" ControlToValidate="AgeBox" ></asp:RangeValidator>
    </td></tr>

    <tr><td>  Email:</td><td>
        <asp:TextBox ID="EmailBox" runat="server" TextMode="SingleLine"></asp:TextBox>
        <asp:RegularExpressionValidator runat="server" ValidationExpression=".+\@.+\..{2,4}" ControlToValidate="EmailBox"></asp:RegularExpressionValidator>
        <asp:RequiredFieldValidator ID="EmailRequiredValidator" runat="server" ControlToValidate="EmailBox" Text="Field Required"></asp:RequiredFieldValidator>
    </td></tr>

    <tr><td>  Local adress:</td><td>
        <asp:TextBox ID="AddressBox" runat="server" TextMode="SingleLine"></asp:TextBox>
         <asp:RequiredFieldValidator ID="AddressRequiredValidator" runat="server" ControlToValidate="AddressBox" Text="Field Required"></asp:RequiredFieldValidator>
    </td></tr>

    <tr><td>  Phone:</td><td>
        <asp:TextBox ID="PhoneBox" runat="server" TextMode="SingleLine"></asp:TextBox>
         <asp:RequiredFieldValidator ID="PhoneRequiredValidator" runat="server" ControlToValidate="PhoneBox" Text="Field Required"></asp:RequiredFieldValidator>
    </td></tr>

    <tr><td>
        <asp:CheckBox ID="AcceptCheckBox" runat="server"  Text=" I Accept the Terms Of Service"/>
       
           
        </td>
        <td>.</td>
     </tr>

    </table>
    <asp:Button id="SubmitFormButton" runat="server"/>
 
    </div>
    </form>
</body>
</html>
